//
//  SubscribeHeaderCell.swift
//  NDAi
//
//  Created by 丸子 on 2024/7/4.
//

import UIKit

class SubscribeHeaderCell: UITableViewCell {
    private lazy var vipView: UIView = {
       let view = UIView()
        view.backgroundColor = UIColor(hexString: "#28272D")
        return view
    }()
    
    private lazy var viewImg: UIImageView = {
       let imageView = UIImageView()
        imageView.image = UIImage(named: "icon_mine_解锁更多权益")
        imageView.contentMode = .scaleToFill
        imageView.clipsToBounds = true
        return imageView
    }()
    
    private lazy var viewLb: UILabel = {
       let label = UILabel()
        label.text = "会员权益"
        label.textColor = .white
        label.font = UIFont.pingFangSCMedium(ofSize: 15)
        return label
    }()
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        backgroundColor = .clear
        self.selectionStyle = .none
        self.contentView.addSubview(vipView)
        vipView.addSubviews([viewImg, viewLb])
        vipView.snp.makeConstraints { make in
            make.top.equalToSuperview().inset(0)
            make.bottom.equalToSuperview().offset(-12)
            make.leading.trailing.equalToSuperview()
            make.height.equalTo(44)
        }
        viewImg.snp.makeConstraints { make in
            make.centerY.equalToSuperview()
            make.leading.equalToSuperview().offset(20)
        }
        
        viewLb.snp.makeConstraints { make in
            make.centerY.equalTo(viewImg)
            make.leading.equalTo(viewImg.snp.trailing).offset(8)
        }
        
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
}
